<?php
/***************************************************************
*  Copyright notice
*  (c) 2009, jianyuzhu@gmail.com
*  All rights reserved
*  This script is part of the PPEMI project.
***************************************************************/

class CoreHeaderBase extends Base {
	var $headers = array();
	
	//constructor
	function CoreHeaderBase() {
		
	}
	
	//methods
	function add($header) {
		$this->headers[] = $header;
	}
	
	function start() {
		foreach($this->headers as $header) {
			header($header);
		}
	}
	
	//
	function xml() {
		header('Content-type: application/xml');
	}
	
	function json() {
		header('Content-type: application/json');
	}
}
//
?>